from flask import Flask
from model import db
from views import ucenter_router
app = Flask(__name__)

# 读取配置文件
app.config.from_object('settings.ProductionConfig')
db.init_app(app)

# 读取配置环境变量
# app.config.from_prefixed_env()

# 使用环境变量
# app.config["SECRET_KEY"]  # Is "5f352379324c22463451387a0aec5d2f"

app.register_blueprint(ucenter_router)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"

# with app.app_context():
    # db.create_all()